//
//  ZWHomeTableViewCell.m
//  WanEr
//
//  Created by 高文萍 on 15/12/16.
//  Copyright © 2015年 高文萍. All rights reserved.
//

#import "ZWHomeTableViewCell.h"
#import "WanErHeader.h"

@implementation ZWHomeTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.homeImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.homeImageView];
        self.homeLabel = [[UILabel alloc]init];
        self.homeLabel.textColor = [UIColor whiteColor];
        self.homeLabel.textAlignment = NSTextAlignmentCenter;
        self.homeLabel.font = [UIFont systemFontOfSize:21 weight:3];
        [self.contentView addSubview:self.homeLabel];
        
        self.lineView = [[UILabel alloc]init];
        self.lineView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.lineView];
        
        self.hotLabel = [[UILabel alloc]init];
        self.hotLabel.textColor = [UIColor whiteColor];
        self.hotLabel.textAlignment = NSTextAlignmentCenter;
        self.hotLabel.font = [UIFont systemFontOfSize:17 weight:3];
        [self.contentView addSubview:self.hotLabel];
        
        self.cityLabel = [[UILabel alloc]init];
        self.cityLabel.frame = CGRectMake(0, 58, WIDTH, 30);
        self.cityLabel.font = [UIFont systemFontOfSize:22];
        self.cityLabel.textAlignment = NSTextAlignmentCenter;
        self.cityLabel.textColor = [UIColor colorWithRed:1.000 green:0.895 blue:0.519 alpha:1.000];
        [self.contentView addSubview:self.cityLabel];
        
                
    }
    
    return self;
}

- (void)layoutSubviews
{
    
    [super layoutSubviews];
    self.homeImageView.frame = CGRectMake(0, 10, CONTENTWIDTH, CONTENTHEIGHT - 10);
    self.homeLabel.frame = CGRectMake(CONTENTWIDTH / 2 - 50, CONTENTHEIGHT / 2 - 20, 100, 40);
    self.lineView.frame = CGRectMake(CONTENTWIDTH / 2  - 50, CONTENTHEIGHT / 2 -20 + 40 + 10, 100, 2);
    self.hotLabel.frame = CGRectMake(CONTENTWIDTH / 2 - 50, CONTENTHEIGHT / 2 - 20 + 40 + 10 + 12, 100, 40);
    self.cityLabel.frame = CGRectMake(0, 20, CONTENTWIDTH, 40);

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
